<template>
	<div>
		<div v-transfer-dom>
			<loading  v-model="loading.status" :text="loading.text"></loading>
		</div>
	</div>
</template>

<script>
import { mapActions, mapState,Loading, TransferDomDirective as TransferDom } from 'vuex'
export default {
  name: 'app',
  directives: {
    TransferDom
  },
  components:{
    Loading
  },
  computed:{
    ...mapState({
      loading: state => state.loading,
    })
  },
  methods:{
    ...mapActions(['startLoading',]),

    show(){
        this.startLoading({status: true, text: '加载..'})
        
    },
    up(){
        this.startLoading({status: false, text: '加载..'})
    }
  },
  created(){
    this.show();
  }
}
</script>